package com.example.dingdong.daomain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 
 * @ClassName: AdminEntity
 * @Description: 
 * @Author :chengwenixng
 * @Copyright: Smartlab411
 * @DateTime 2021-06-04 09:47:16
 */
@Entity
@Table(name ="admin_entity")
public class AdminEntity implements Serializable{

	private static final long serialVersionUID = 1L;

	/**
	 * 数据库自增长ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	/**
	 * 删除标识
	 */
	private boolean delFlag = true;
	
	/**
	 * 是否授权
	 */
	private Boolean authorization = false;

	/**
	 * 普通员工-基础用户（一对一）
	 */
	@OneToOne(mappedBy = "adminEntity", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private BasicUserEntity basicUserEntity;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public boolean isDelFlag() {
		return delFlag;
	}

	public void setDelFlag(boolean delFlag) {
		this.delFlag = delFlag;
	}

	public BasicUserEntity getBasicUserEntity() {
		return basicUserEntity;
	}

	public void setBasicUserEntity(BasicUserEntity basicUserEntity) {
		this.basicUserEntity = basicUserEntity;
	}

	public Boolean getAuthorization() {
		return authorization;
	}

	public void setAuthorization(Boolean authorization) {
		this.authorization = authorization;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
